<%@page import="beans.AdminPais"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Bienvenido!!</title>
        <link rel=stylesheet  href="css/estilo.css" type="text/css" />

        <script type="text/javascript" src="js/libs/jquery-1.7.1.js"></script>
        <script type="text/javascript" src="js/uploadfile.js"></script>    
    </head>
    <body>
        <%@include file="cabecera.jsp" %>
        <div class="principal"> 
            <div class="lateral">
                <br>
                <%@include  file="barraMenu.jsp" %>
            </div>
            <div class="contenido">
                <form name="userform" method="POST" action="ServletUsuario?tipo=2">
                    <br><br><br>
                    <table align="center" width="300px" style="background-color:#EDF6EA;border:2 solid #4682B4;">
                        <tr><td colspan=2 align="center"><h2>Registrar Usuario</h2></td></tr>
                        <tr>
                            <td><b>Nombres: (*)</b></td>
                            <td><input type="text" name="nombre" required maxlength="30" onkeypress="return validar_texto(event)"></td>
                        </tr>
                        <tr>
                            <td><b>Apellidos:(*) </b></td>
                            <td><input type="text"  name="apellido"required maxlength="30" onkeypress="return validar_texto(event)"></td>
                        <tr>
                            <td><b>Nombre de Usuario:(*)</b></td>
                            <td><input type="text"  name="username"required  maxlength="15" placeholder="Ej. admin" onkeypress="return validar_nomUsuario(event)"></td>
                        </tr>
                        <tr>
                            <td><b>Clave:(*)</b></td>
                            <td><input type="password"  name="pass"required  maxlength="15" placeholder=""></td>
                        </tr>
                        <tr>
                        <td><b>Email:(*)</b></td>
                        <td><input type="email"  name="correo"required maxlength="35" onkeypress="return validar_correo(event)"></td>
                        </tr>
                        <td><b>Pais:(*)</b></td>
                        <td><select name="paises">             
                                <% ArrayList<String> nombresP = AdminPais.getPaises();
                                    for (int i = 0; i < nombresP.size(); i++) {
                                        String n = nombresP.get(i);
                                %>
                                <option><%= n.toString()%></option>
                                <%}%>
                            </select></td>
                        </tr>

                        <tr>
                            <td>
                            </td>
                            <td><input type="submit" name="Submit" value="Guardar" style="background-color:#4682B4;font-weight:bold;color:#ffffff;"></td>
                        </tr>	
                    </table>
                </form>
            </div>
        </div>
        <%@include  file="pie.jsp" %>
    </body>
</html>